package com.linux.huhx.output;

import com.linux.huhx.base.adapter.FileOutputAdapter;
import com.linux.huhx.base.adapter.StringOutputAdapter;
import org.apache.commons.io.FileUtils;
import org.apache.commons.io.IOUtils;

import java.io.File;
import java.io.IOException;
import java.util.List;

/**
 * Created by huhx on 2017-06-15.
 */
public class FileOutput extends FileOutputAdapter {

    @Override
    public void writeFileFromSource(List<String> stringList, File file) {
        try {
            FileUtils.writeLines(file, stringList);
        } catch (IOException e) {
            e.printStackTrace();
        }

    }
}
